<template>
  <div class="pagination">
    <el-pagination
      @current-change="offerPageIndex"
      @size-change="changePageSize"
      :current-page="1"
      :page-sizes="[8, 12, 16, 20]"
      :page-size="pageSize"
      :layout="layout"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
export default {
    props:{
        total:{
            type:Number,
            default:100
        },
        pageSize:{
            type:Number,
            default:8
        },
        layout:{
            typeof:String,
            default:'total, sizes, prev, pager, next'
        }
    },
    methods:{
        offerPageIndex(current){
            console.log('111',current);
            this.$emit('getPageIndex',current);
        },
        changePageSize(size){
            console.log('333',size);
            this.$emit('getPageSize',size);
        }
    }
}
</script>

<style>

</style>